#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#define ROW 17
int main(void)
{
	int arr[ROW][ROW] = {0};
	int i, j;
	int n=0;
	while (n < 1 || n >16)
	{
		printf(":");
		scanf("%d" ,&n);
	}
	for (i = 1; i <= n; i++)
	{
		arr[i-1][0] = 1;
		for (j = 1; j <=i; j++)
		{
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
		}
	}
	for (i = 0; i < n; i++)
	{
		for (j = 0; j <=i; j++)
		{
			printf("%5d", arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}